#include<iostream>
#include<stdio.h>
#include "Matrix.h"
using namespace std;

int main()
{
    
    int row,column;
    
    cout<<"Enter the same number of rows and columns: ";
    cin>>row>>column;
    Matrix<int> M1(row,column);

	cout << "is the matrix 1 square ? ANSWER: "<< M1.Is_square() << endl;

	cout << "start input" << endl;
	for (int i = 0;i < M1.Row;i++)
	{
		cout <<"Row:" << i + 1 << endl;
		for (int j = 0;j < M1.Col;j++)
		{
			cin >> M1.matrix_elements[i][j];
			cout << " ";
		}

		cout << endl;
	}

	M1.Print_matrix();

	cout<<"Enter the same number of rows and columns: ";
    cin>>row>>column;
    Matrix<int> M2(row,column);

	cout << "is the matrix 1 square ? ANSWER: "<< M1.Is_square() << endl;

	cout << "start input" << endl;
	for (int i = 0;i < M2.Row;i++)
	{
		cout <<"Row:" << i + 1 << endl;
		for (int j = 0;j < M2.Col;j++)
		{
			cin >> M2.matrix_elements[i][j];
			cout << " ";
		}

		cout << endl;
	}

	M2.Print_matrix();

	cout << endl;

	if (M1 == M2)
	{
		Matrix<int> Result(row, column);

		M1.Multiply(Result, M2);
		if (Result.matrix_elements != nullptr)
		{
			Result.Print_matrix();
		}
	}

	int temp;
	cin >> temp;

	return 0;
}